package org.xg.study.boot.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import org.xg.study.boot.common.ajax.ResultData;
import org.xg.study.boot.common.logs.CodeBookLogger;
import org.xg.study.boot.common.utils.ResultUtil;

/**
 * @author CMG
 * @version 1.0
 * @description
 * @cLassName HelloController
 * @date 2021/10/9 9:47
 **/
@RestController
@CrossOrigin
@RequestMapping("/hello")
@Api(tags = "HelloWorld接口列表")
public class HelloController {
    protected CodeBookLogger log = new CodeBookLogger(HelloController.class);

    @RequestMapping(value = "/hi", produces = "application/json; charset=utf-8", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(value = "测试接口hi")
    public ResultData<String> hi(){
        String msg = "Hello World!";
        return ResultUtil.success(msg);
    }
}
